<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%

String name=(String)session.getAttribute("name");
   if(name==null) response.sendRedirect("cache.jsp"); %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="css/bgstretcher.css">
<link rel="stylesheet" href="css/demo.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/slider.js"></script>  
<SCRIPT src="js/jquery.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="js/jquery.min.js" type=text/javascript></SCRIPT>
<script type="text/javascript" src="js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="js/jquery-bgstretcher-3.0.1.min.js"></script>

<style>
*{margin:0;padding:0;}
body{margin:0px 250px;font-size:12px;color:#666;}
li{list-style:none;align:center;}
.list{width:880px;height:100%;padding:10px;font-size:14px;line-height:24px;border:1px #cfedff solid;border-top:0;align:center}
.tab{width:900px;height:34px;border:1px #cfedff solid;border-bottom:0;align:right}
.tab ul{margin:0;padding:0;align:center}
.tab li{float:left;padding:0 30px;height:34px;line-height:34px;text-align:center;border-right:1px #ebf7ff solid;cursor:pointer;align:center}
.tab li.on_zzjs{color:#5299c4;font-weight:bold;align:center}
.block{display:block;align:center}
</style>
<script type="text/javascript">
function settab_zzjs(name,num,n){
 for(i=1;i<=n;i++){
  var menu=document.getElementById(name+i);
  var con=document.getElementById(name+"_"+"zzjs"+i);
  menu.className=i==num?"on_zzjs":"";
    con.style.display=i==num?"block":"none";
 }
}//欢迎来到站长特效网，我们的网址是www.zzjs.net，很好记，zz站长，js就是js特效，本站收集大量高质量js代码，还有许多广告代码下载。
</script>
<script type="text/javascript">
        jQuery(function($){
            $("body").bgStretcher({
                images: ["images/sample-2.jpg"],
                imageWidth: 1600,
                imageHeight: 1200
            })
        });
    </script>

<SCRIPT type=text/javascript>
$(document).ready(function() {	
	$("#menu1 li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
	
	$("#menu1 li").each(function() { //For each list item...
		var linkText = $(this).find("a").html(); //Find the text inside of the a tag
		$(this).find("span").show().html(linkText); //Add the text in the span tag
	}); 
	
	$("#menu1 li").hover(function() {	//On hover...
		$(this).find("span").stop().animate({ 
			marginTop: "-40" //Find the span tag and move it up 40 pixels
		}, 250);
	} , function() { //On hover out...
		$(this).find("span").stop().animate({
			marginTop: "0" //Move the span back to its original state (0px)
		}, 250);
	});	
	
	/*	2nd example	*/
	$("#menu2 li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
	
	$("#menu2 li").each(function() { //For each list item...
		var linkText = $(this).find("a").html(); //Find the text inside of the a tag
		$(this).find("span").show().html(linkText); //Add the text in the span tag
	}); 
	
	$("#menu2 li").hover(function() {	//On hover...
		$(this).find("span").stop().animate({ 
			marginTop: "-40" //Find the span tag and move it up 40 pixels
		}, 250);
	} , function() { //On hover out...
		$(this).find("span").stop().animate({
			marginTop: "0" //Move the span back to its original state (0px)
		}, 250);
	});	
});
</SCRIPT>
<title></title>
</head>
<body>

<span style="color:white; margin:0px 0px">欢迎你：<%=name %></span>
<div align="right"><a href="revoke.jsp" >退出当前账号</a></div>
<hr  >
<div id="menu1">
  <ul>
	<li><a href="home.jsp"><font size=4>首　　 页</font></a></li>
	<li><a href="serv.jsp"><font size=4>服          务</font></a></li>
	<li><a href="sasion.jsp"><font size=4>留  言   板</font></a></li>
	<li><a href="person.jsp"><font size=4>成           绩</font></a></li>
	
  </ul>
  <div class="cls"></div>
</div>
 <h1 align="center">常用信息查询</h1>
    <div class="tab">
        <ul>
            <li id="zzjs_net1" onclick="settab_zzjs('zzjs_net',1,4)" class="on_zzjs" align="center">   <font size=4 >蹭课查询</font></li>
            <li id="zzjs_net2" onclick="settab_zzjs('zzjs_net',2,4)"align="center"><font size=4 >招聘会查询</font></li>
            <li id="zzjs_net3" onclick="settab_zzjs('zzjs_net',3,4)"align="center"><font size=4 >常用号码查询</font></li>
            <li id="zzjs_net4" onclick="settab_zzjs('zzjs_net',4,4)"align="center"><font size=4 >图书馆查询</font></li>
        </ul>
    </div>
    <div class="list">
        <div id="zzjs_net_zzjs1">
         <div> 
         <form id=form5 name=form5 methon="get" action="search0" >
						<input type=text name="KCM"  value="请准确输入课程全名"  style="algin:center">
						<input type=text name="JSM"  value="请准确输入教师全名" algin="center">
                        <input type=submit id=008 value="蹭课查询">
                        
	     </form>
         <% 
    request.setCharacterEncoding("UTF-8");
    Connection conn = null; 
    Statement stat = null; 
    ResultSet rs = null;
    String KCM = request.getParameter("KCM");
    String JSM = request.getParameter("JSM");
   	Class.forName("com.mysql.jdbc.Driver"); 
    String url = "jdbc:mysql://localhost:3306/db_database10?characterEncoding=UTF-8"; 
    String user = "root"; 
    String password = "123"; 
    conn = DriverManager.getConnection(url,user,password); 
    stat = conn.createStatement(); 

    rs = stat.executeQuery("select * from tb_ck where KCM ='"+KCM+"' or JSM='"+JSM+"'");

    %>
    <br>
        <h3 align="center">符合条件的课程</h3><hr> 
    <br>
     <table align="center" width="450" border="100" cellSpacing=1 style="font-size:15pt;border:dashed 2pt;">
    <tr>
    <td>序号</td>
    <td>教师名</td>
    <td>课程名</td>
    <td>时间</td>
    <td>地点</td>
    <td>节次</td>
    </tr>
    <% 
    while(rs.next())
    {
    out.print("<tr>");
    out.print("<td>" + rs.getInt("id") + "</td>");
    out.print("<td>" + rs.getString("JSM") + "</td>");
    out.print("<td>" + rs.getString("KCM") + "</td>");
    out.print("<td>" + rs.getString("SJ") + "</td>");
    out.print("<td>" + rs.getString("DD") + "</td>");
    out.print("<td>" + rs.getString("JC") + "</td>");
      %>
    <%
    out.print("</tr>");
    }
  %>
      </table>
      <br>
      <br>
       <% 
    if(rs != null)
    {
        rs.close();
        rs = null;
    }
        if(stat != null)
    {
        stat.close();
        stat = null;
    }
        if(conn != null)
    {
        conn.close();
        conn = null;
    }
    %></div>
        </div>
        <div id="zzjs_net_zzjs2" style="display:none;">
        <div> 
        <form id=form00 name=form000 methon="get" action="search0">
				<select name="DD" id="select">
    
                            <option>一工</option>
                            <option>二工</option>
                             <option>四工</option>
                            <option>逸夫楼</option>
                             <option>学术交流中心</option>
                              <option>艺文馆</option>
                </select>
				<input type=text id=007 name="RQ" value="请正确输入日期">
			    <input type=submit id=008 value="点击查询">
			    </form>
					<% 
    request.setCharacterEncoding("UTF-8");
    Connection conn0 = null; 
    Statement stat0 = null; 
    ResultSet rs0 = null;
 
   	Class.forName("com.mysql.jdbc.Driver"); 
    String url0 = "jdbc:mysql://localhost:3306/db_database10?characterEncoding=UTF-8"; 
    String user0 = "root"; 
    String password0= "123"; 
    String DD = request.getParameter("DD");
    String RQ = request.getParameter("RQ");
    conn0 = DriverManager.getConnection(url0,user0,password0); 
    stat0 = conn0.createStatement(); 
 
      rs0 = stat0.executeQuery("select * from tb_zph where DD='"+DD+"' or RQ='"+RQ+"'");
      
    %>
    <br>
	<br>
        <h3 align="center">符合条件的招聘会</h3><hr> 
    <br>
     <table align="center" width="450" border="100" cellSpacing=1 style="font-size:15pt;border:dashed 1pt">
    <tr>
    <td>序号</td>
    <td>时间</td>
    <td>地点</td>
    <td>公司名称</td>
    <td>招聘岗位</td>
    <td>日期</td>
  
    </tr>
    <% 
    while(rs0.next())
    {
    out.print("<tr>");
    out.print("<td>" + rs0.getInt("id") + "</td>");
    out.print("<td>" + rs0.getString("DD") + "</td>");
    out.print("<td>" + rs0.getString("SJ") + "</td>");
    out.print("<td>" + rs0.getString("MC") + "</td>");
    out.print("<td>" + rs0.getString("GW") + "</td>");
    out.print("<td>" + rs0.getDate("RQ") + "</td>");
      %>
    <%
    out.print("</tr>");
    }
  %>
      </table>
      <br>
      <br>
       <% 
    if(rs0 != null)
    {
        rs0.close();
        rs0 = null;
    }
        if(stat0 != null)
    {
        stat0.close();
        stat0 = null;
    }
        if(conn0 != null)
    {
        conn0.close();
        conn0 = null;
    }
    %>
	</div>
        </div>
        <div id="zzjs_net_zzjs3" style="display:none;">
         <div> 
                   <form id=form5 name=form5 methon="get" action="search0" >
						<input type=text name="KCM"  value="请准确输入课程全名"  style="algin:center">
						<input type=text name="JSM"  value="请准确输入教师全名" algin="center">
                        <input type=submit id=008 value="号码查询">    
	               </form>
	<% 
    request.setCharacterEncoding("UTF-8");
    Connection conn1 = null; 
    Statement stat1 = null; 
    ResultSet rs1 = null;
    
   	Class.forName("com.mysql.jdbc.Driver"); 
    String url1 = "jdbc:mysql://localhost:3306/db_database10?characterEncoding=UTF-8"; 
    String user1 = "root"; 
    String password1 = "123"; 
    String YX = request.getParameter("YX");
    String JSM0 = request.getParameter("JSM0");
    conn1 = DriverManager.getConnection(url1,user1,password1); 
    stat1 = conn1.createStatement(); 
        rs1 = stat1.executeQuery("select * from tb_dd where YX='"+YX+"'or JSM='"+JSM0+"'");
    %>
	<br>
        <h3 align="center">符合条件的教师信息</h3><hr> 
    <br>
     <table align="center" width="450" border="100" cellSpacing=1 style="font-size:15pt;border:dashed 1pt">
    <tr>
    <td>序号</td>
    <td>院系</td>
    <td>教师名</td>
    <td>电话</td>
 </tr>
    <% 
    while(rs1.next())
    {
    out.print("<tr>");
    out.print("<td>" + rs1.getInt("id") + "</td>");
    out.print("<td>" + rs1.getString("YX") + "</td>");
    out.print("<td>" + rs1.getString("JSM") + "</td>");
    out.print("<td>" + rs1.getString("DD") + "</td>");

      %>
    <%
    out.print("</tr>");
    }
  %>
      </table>
      <br>
      <br>
       <% 
    if(rs1 != null)
    {
        rs1.close();
        rs1 = null;
    }
        if(stat1 != null)
    {
        stat1.close();
        stat1 = null;
    }
        if(conn1 != null)
    {
        conn1.close();
        conn1 = null;
    }
    %>  
	</div>
        </div>
        <div id="zzjs_net_zzjs4" style="display:none;">
         <div><form id=form5 name=form5 methon="post" action="">
						<input type=text id=006 value="请输入关键字">
						<input type=submit id=008 value="点击查询">
	         </form>
	     </div>
        </div>
    </div>

    
    
    
</body>
</html>

